package br.com.skolar.client;

import br.com.skolar.client.events.SearchQuestionsEvent;
import br.com.skolar.client.framework.AbstractPlaceManager;
import br.com.skolar.client.framework.EventBus;
import br.com.skolar.client.view.SkolarMessages;

import com.google.inject.Inject;

public class Controller extends AbstractPlaceManager {
	@Inject
	protected Controller(EventBus eventBus, SkolarPresenter skolar, SkolarMessages messages) {
		super(eventBus, messages);
	}

	@Override
	public void go(String token) {
		TokenParser tp = new TokenParser(token);
		if (tp.key.isEmpty()) {
			eventBus.fireEvent(new SearchQuestionsEvent());
		}
	}
}